function AsideSearch() { $("#SidebarSearch")
        .keypress(function (event) { var keycode = event.keyCode ? event.keyCode : event.which; if (keycode == "13") { console.log($("#SidebarSearch")
                    .val()); if ($("#SidebarSearch")
                    .val() == "") { toastr.warning("Please enter search content!"); return false } PSearchSidebar() } });
    $(".sidebar-search .search-btn")
        .click(function () { if ($("#SidebarSearch")
                .val() == "") { toastr.warning("Please enter search content!") } }) } AsideSearch();

function companyVisionAccordion() { var Accordion = function (el, multiple) { this.el = el || {};
        this.multiple = multiple || false; var links = this.el.find(".link");
        links.on("click", { el: this.el, multiple: this.multiple }, this.dropdown) };
    Accordion.prototype.dropdown = function (e) { var $el = e.data.el;
        ($this = $(this)), ($next = $this.next());
        $next.slideToggle();
        $this.parent()
            .toggleClass("open"); if (!e.data.multiple) { $el.find(".content")
                .not($next)
                .slideUp()
                .parent()
                .removeClass("open") } };
    new Accordion($("#accordion"), false) } companyVisionAccordion();

function sidebarCate() { $(".sidebar-cate .menu-item .sub-menu")
        .before('<em class="iconfont icon-xiangyoujiantou"></em>'); var Accordion = function (el, multiple) { this.el = el || {};
        this.multiple = multiple || false; var links = this.el.find("em");
        links.on("click", { el: this.el, multiple: this.multiple }, this.dropdown) };
    Accordion.prototype.dropdown = function (e) { var $el = e.data.el;
        ($this = $(this)), ($next = $this.next());
        $next.slideToggle();
        $this.parent()
            .toggleClass("active"); if (!e.data.multiple) { $el.find(".sub-menu")
                .not($next)
                .slideUp()
                .parent()
                .removeClass("active") } };
    new Accordion($(".sidebar-cate"), false) } sidebarCate();

function proDetailsTabs() { var dataID = $('#tagTabs')
        .attr('data-id'); if (dataID == 1) { $("#tagTabs .tagItem:nth-child(1)")
            .click(function () { $("html,body")
                    .animate({ scrollTop: $("#tagContent0")
                            .offset()
                            .top - 80 }, 500) });
        $("#tagTabs .tagItem:nth-child(2)")
            .click(function () { $("html,body")
                    .animate({ scrollTop: $("#tagContent1")
                            .offset()
                            .top - 80 }, 500) }) } else { $('#tagContent1')
            .hide();
        $("#tagTabs .tagItem:nth-child(1)")
            .click(function () { $("#tagTabs .tagItem")
                    .removeClass('current');
                $(this)
                    .addClass('current');
                $('#tagContent0')
                    .show();
                $('#tagContent1')
                    .hide() });
        $("#tagTabs .tagItem:nth-child(2)")
            .click(function () { $("#tagTabs .tagItem")
                    .removeClass('current');
                $(this)
                    .addClass('current');
                $('#tagContent0')
                    .hide();
                $('#tagContent1')
                    .show() }) } } proDetailsTabs();


function AsideCateActive() { var breadcrumbsHref = $(".banner-breadcrumbs>a:last-child")
        .attr("href");
    $(".sidebar-cate>li>a")
        .each(function () { if (breadcrumbsHref == $(this)
                .attr("href")) { $(this)
                    .parents("li")
                    .addClass("active")
                    .children(".sub-menu")
                    .show() } });
    $(".sidebar-cate .menu-item .sub-menu li a")
        .each(function () { if (breadcrumbsHref == $(this)
                .attr("href")) { $(this)
                    .parents("li")
                    .addClass("active");
                $(this)
                    .parents(".sidebar-cate .menu-item")
                    .children(".sub-menu")
                    .show() } }) } AsideCateActive();
$(function () { if ($(".inquiry-prolist")
        .length) { const inquirylist = localStorage.getItem("productCachePC"); const arr = JSON.parse(inquirylist);
        
		
		
        function productCache() { if (arr.length > 0) { $(".inquiry-prolist")
                    //.show() } for (let i in arr) { var t = arr[i];
                $(".inquiry-prolist")
                    .append('<div class="inquiry-pro-item" data-id="'.concat(t.id, '"><div class="pro-item-img"><a href="')
                        .concat(t.url, '"><img src="')
                        .concat(t.image, '" alt="')
                        .concat(t.name, '"></a></div><div class="pro-item-name">Product name:<p><a href="')
                        .concat(t.url, '">')
                        .concat(t.name, '</a></p></div><div class="pro-item-del"><i class="iconfont icon-guanbi"></i></div></div>')) } } productCache();
        $(".pro-item-del")
            .click(function () { $(this)
                    .parents(".inquiry-pro-item")
                    .remove(); var dataid = $(this)
                    .parents(".inquiry-pro-item")
                   // .attr("data-id"); for (let i in arr) { if (arr[i].id == dataid) { arr.splice(i, 1);
                        localStorage.setItem("productCachePC", JSON.stringify(arr)); if (arr.length == 0) { $(".inquiry-prolist")
                                .hide() } /*} }*/ }) } if (typeof Swiper !== "undefined") { var pagevideo = new Swiper("#pagevideo", { slidesPerView: 3, spaceBetween: 30, pagination: { el: ".swiper-pagination", type: "fraction" }, navigation: { nextEl: ".video-button-next", prevEl: ".video-button-prev" }, breakpoints: { 0: { slidesPerView: 1, spaceBetween: 10 }, 768: { slidesPerView: 2, spaceBetween: 20 }, 1024: { slidesPerView: 3, spaceBetween: 20 } } }); var teamTookSwiper = new Swiper("#teamTookSwiper", { autoplay: { disableOnInteraction: false, delay: 2000 }, slidesPerView: 4, spaceBetween: 30, loop: true, pagination: { el: ".took-pagination", clickable: true }, breakpoints: { 320: { slidesPerView: 2, spaceBetween: 10 }, 768: { slidesPerView: 4, spaceBetween: 20 } } }) 
								
								
} });
function pageFaq() {  { $(".project-list")
            .addClass("faqs-list");
        $(".faqs-list li:nth-child(1) .project-info")
            .addClass("open") } var Accordion = function (el, multiple) { this.el = el || {};
        this.multiple = multiple || false; var links = this.el.find(".project-name");
        links.on("click", { el: this.el, multiple: this.multiple }, this.dropdown) };
    Accordion.prototype.dropdown = function (e) { var $el = e.data.el;
        ($this = $(this)), ($next = $this.next());
        $next.slideToggle();
        $this.parent()
            .toggleClass("open"); if (!e.data.multiple) { $el.find(".project-content")
                .not($next)
                .slideUp()
                .parent()
                .removeClass("open") } };
    new Accordion($(".faqs-list"), false) } pageFaq();
function proDetailsVideo() { var mediaSrc = $("#media source")
        .attr("src"); if (mediaSrc != "") { $(".preview-container .thumbnail-box .item")
            .click(function () { $("#media")
                    .hide();
                $(".small-box")
                    .show();
                $(".vPlay")
                    .show() });
        $(".vPlay")
            .click(function () { $("#media")
                    .show();
                $(".small-box")
                    .hide() }) } else { $(".vPlay")
            .hide() } }
if (!isMob()) { proDetailsVideo() }

function isSeo() { const probottom = $(".pro-bottom")
        .text()
        .replace(/\s*/g, ""); if (probottom == "") { $(".pro-bottom")
            .hide() } } isSeo();

function proDetailSwiper() { if (window.innerWidth > 768) { if ($("#gallery")
            .length) { var swiperproduct = new Swiper("#gallery", { slidesPerView: 3, spaceBetween: 30, navigation: { nextEl: ".prodetails-button-next", prevEl: ".prodetails-button-prev" }, breakpoints: { 0: { spaceBetween: 10 }, 1280: { spaceBetween: 30 } } }) } } $('.preview-container .thumbnail-box .item .imgalt')
        .each(function () { if ($(this)
                .html() == '') { $(this)
                    .hide() } }) } proDetailSwiper();

function pageseobox() { if ($(".pro-bottom")
        .text() == "") { $(".pro-bottom")
            .hide() } } pageseobox();
$(function () { if (isMob()) { $(".page-main")
            .append($(".sidebar-item.inquiry")) } $(".pro-btn.send,.newsendinquiry")
        .click(function () { $("html,body")
                .animate({ scrollTop: $("#toinquiry")
                        .offset()
                        .top - 70 }, 500) });
    $('article table')
        .wrap('<div class="table-wrap"></div>') });
